import {requestError,netError} from '../util/util.js'

// 获取工单列表
export const getOrderList = async (data) => {
  try {
    const response = await uni.$http.get('farm/orders/list',data);
    if (response.data.code !== 200) {
      requestError()
      return {};
    }
    return response.data;
  } catch (error) {
    console.error('Network request failed:', error);
    netError()
    return {};
  }
};